<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
<div id="app">
    <!--动态绑定style数组语法方式一-->
    <div :style="[{fontSize:'10px'},{backgroundColor:'red'}]">动态绑定style数组语法方式一</div>
    <!--动态绑定style对象语法方式二-->
    <div :style="[styleObj1,styleObj2]">动态绑定style数组语法方式二</div>
</div>
<script src="../../JavaScript/vue.js"></script>
<script>
    const app = Vue.createApp({
        data() {
            return {
                styleObj1:{
                    backgroundColor:'red'
                },
                styleObj2:{
                    fontSize:"20px"
                },

            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>